﻿using System;
using System.Collections.Generic;
using VeMayBayDTO;

namespace VeMayBayDAO
{
    public  class VeDAO
    {

        public static bool GhiNhanBanVe(VeDTO ve)
        {
            string query = @"insert into ve (machuyenbay,cmnd,soluong,mahangve,tongTien,ngayban) 
                             values (" + ve.ChuyenBay.MaChuyenBay + ",'" + ve.KhachHang.CMND + "'," + ve.SoLuong + "," + ve.HangVe.MaHangVe + "," + ve.TongTien + ",'" + ve.NgayBan.ToString() + "')";
            int n = DataProvider.ExecNonQuery(query);
            if (n == 0)
                return false;
            return true;
        }
        public static bool GhiNhanDatVe(DatVeDTO ve)
        {
            return true;
        }
        public static int SoGheDat(string chuyenbayID)
        {
            return 1;
        }

        public static bool HuyVe(string id)
        {
            return true;
        }
        
    }
}
